<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="jt.classic.system.ISystem"%>
<%@ page import="jt.classic.system.user.IUser"%>
<%
	IUser user = ISystem.getSessionUser(request);

	String context = ISystem.getContextPath();

	String url = context + "/system/blank.jsp";

	if (ISystem.matchrole(user, "qdhb")) {
		url = context + "/app/customer.do?method=edit";
	}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD id=Head1>
<TITLE>main area</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<jsp:include page="../system/head.jsp"></jsp:include>
<link href="images/skin.css" rel="stylesheet" type="text/css" />
<style>
body {
	font:12px Arial, Helvetica, sans-serif;
	color: #000;
	background-color: #EEF2FB;
	margin: 0px;
}	

.desktop{
    background-image: url(images/desktop.png ) !important;
}

.tabs{
    background-image: url(images/tabs.gif ) !important;
}
</style>
<script type="text/javascript">
function handleURL(id, url, title){
    var tabid = 'tab_' + id;
	
	if (!Ext.getCmp(tabid)) {		
		Ext.getCmp('consoletabs').add({
		    id : tabid,
            title: title,
            tabTip: title,
            iconCls: 'tabs',
            html: '<iframe src="'+url+'" id="'+tabid+'_frm" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe>',
            closable:true
        }).show();
	}else{
	   Ext.getCmp('consoletabs').setActiveTab(tabid);
	   Ext.get(tabid + '_frm').dom.src = url;
	}
	
}

Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'side';

Ext.onReady(function() {
	var tabs = new Ext.TabPanel({
				id : 'consoletabs',
				region : 'center', // a center region is ALWAYS
				// required for border layout
				closable : true,
				resizeTabs : true,
				minTabWidth : 150,
				tabWidth : 150,
				deferredRender : false,
				enableTabScroll : true,
				margins : '0 0 0 0',
				activeTab : 0, // first tab initially active
				items : []
			});
	
	/*Ext.getCmp('consoletabs').add({
		    id : 'desktop',
            title: '我的桌面',
            tabTip: '个人桌面',
            tabWidth : 100,
            iconCls: 'desktop',
            html: '<iframe src="'+context+'/system/blank.jsp" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe>',
            closable: false
        }).show();*/		

	new Ext.Viewport({
				layout : 'border',
				frame : false,
				items : [tabs],
				renderTo : Ext.getBody()
			});
});
</script>
<body>
</body>
</html>